1. Field of the Invention
Embodiments of the present invention generally relate to a method and apparatus for determination of motion estimation search window area utilizing adaptive sliding window algorithm.
2. Background of the Invention
Motion estimation (ME) block in video coding consumes a significant amount of memory access bandwidth to external memory such as SDRAM. The memory access patterns during ME are fairly regular and caching strategies are typically used to exploit this regularity to reduce memory access bandwidth. FIG. 1 shows the two common caching approaches. FIG. 1(a) shows a sliding window approach and FIG. 1(b) shows a growing window approach.
In the sliding window approach the search window does not cover a complete row of macroblocks as shown in FIG. 1(a). In FIG. 1(a), the solid line box shows the previous search window and the dashed line box shows the current search window. After each macroblock is processed, the sliding window moves to right by one column of macroblocks. Let (C, H) be the (width, height) of sliding window and let N be the number of macroblocks in the picture. The memory bandwidth required without sliding window approach is N*C*H and is equal to N*16*H when sliding window is used. Using sliding window cache reduces bandwidth requirements by a factor of C/16. The internal memory required for the cache is C*H bytes.
In the growing window approach, the search window covers a complete row of macroblocks, as shown in FIG. 1(b). In FIG. 1(b), the solid line box shows the previous search window and the dashed line box shows the current search window. After a complete row of macroblocks is processed, the growing window moves down one row of macroblocks. With the growing window cache system each pixel of reference picture is loaded only once. Hence, the memory bandwidth may required is N*256, which is independent of picture dimensions. However, the internal memory required for the cache is W*H, where W is the width of the picture and H is the height of growing window. W*H can become significantly high for high definition (HD) resolutions and when bi-directional or multi-frame coding is adopted.
The advantage of sliding window approach over growing window approach is that the sliding window approach needs a much smaller cache and is lower in cost. The disadvantage is that the memory bandwidth required for sliding window approach is larger than that required for growing window approach.
Therefore, there is a need for an improved method and apparatus for determination of motion estimation search window area for a picture.